package com.lin.fengxiu.model;

import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;

/**
 * @ClassName Theme
 * @Description TODO
 * @Author wushaopei
 * @Date 2021/3/17 22:33
 * @Version 1.0
 */
@Entity
@Setter
@Getter
@Where(clause = "delete_time is null")
public class Theme extends BaseEntity{
    @Id
    private Long id;
    private String title;
    private String description;
    private String name;
    private String tplName;
    private String entranceImg;
    private String extend;
    private String internalTopImg;
    private String titleImg;
    private Boolean online;

    @ManyToMany(fetch = FetchType.LAZY)
    @JoinTable(name = "theme_spu",joinColumns = @JoinColumn(),
            inverseJoinColumns = @JoinColumn(name = "spu_id"))
    private List<Spu> spuList;
}
